<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="pageContent">
	<form method="post" action="<c:url value='/customerVisit/edit?navTabId=customerVisitList&callbackType=closeCurrent'/>"
		class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<input type="hidden" name="id" value="${customerVisit.id}" />
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>日期：</label> <input name="contactDate"
					<c:if test="${customerVisit.contactDate == null || customerVisit.contactDate == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">class="required date"</c:if>
					type="text" readonly="true" dateFmt="yyyy-M-d" value="${customerVisit.contactDate}" />
				<c:if
					test="${customerVisit.contactDate == null || customerVisit.contactDate == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>客户名称：</label> <input name="customer" type="text" class="required" size="30" value="${customerVisit.customer}"
					lookupGroup=""
					<c:if test="${customerVisit.customer != null && customerVisit.customer != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
				<c:if
					test="${customerVisit.customer == null || customerVisit.customer == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">
					<a class="btnLook" href="<c:url value='/showCustomerLookup'/>" lookupGroup="">查找带回</a>
				</c:if>
			</p>
			<p>
				<label>客户类型：</label> <input name="customerType" type="text" class="required" size="30"
					value="${customerVisit.customerType}"
					<c:if test="${customerVisit.customerType == null || customerVisit.customerType == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">suggestFields="customerType"
					suggestUrl="<c:url value='/showCustomerTypeSuggest' />" lookupGroup="" </c:if>
					<c:if test="${customerVisit.customerType != null && customerVisit.customerType != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>地址：</label> <input name="address" type="text" size="30" value="${customerVisit.address}"
					<c:if test="${customerVisit.address != null && customerVisit.address != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>联系人：</label> <input name="contacts" type="text" class="required" size="30" value="${customerVisit.contacts}"
					<c:if test="${customerVisit.contacts != null && customerVisit.contacts != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>部门：</label> <input name="department" type="text" class="required" size="30"
					value="${customerVisit.department}"
					<c:if test="${customerVisit.department != null && customerVisit.department != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>职务：</label> <input name="job" type="text" class="required" size="30" value="${customerVisit.job}"
					<c:if test="${customerVisit.job != null && customerVisit.job != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>座机：</label> <input name="telephone" type="text" class="phone" size="30" value="${customerVisit.telephone}"
					<c:if test="${customerVisit.telephone != null && customerVisit.telephone != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>手机：</label> <input name="phone" type="text" class="phone" size="30" value="${customerVisit.phone}"
					<c:if test="${customerVisit.phone != null && customerVisit.phone != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>传真：</label> <input name="fax" type="text" class="phone" size="30" value="${customerVisit.fax}"
					<c:if test="${customerVisit.fax != null && customerVisit.fax != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>其他联系方式：</label> <input name="otherContact" type="text" size="30" value="${customerVisit.otherContact}"
					<c:if test="${customerVisit.otherContact != null && customerVisit.otherContact != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>需求：</label> <input name="requirment" type="text" class="required" size="30"
					value="${customerVisit.requirment}"
					<c:if test="${customerVisit.requirment != null && customerVisit.requirment != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>备注：</label> <input name="remarks" type="text" class="text" size="30" value="${customerVisit.remarks}" />
			</p>
			<p>
				<label>结果：</label> <select name="result" class="required combox">
					<option value="">请选择</option>
					<c:forEach var="item" items="${resultList}">
						<option value="${item.contactResult}" ${item.contactResult eq customerVisit.result ? 'selected="selected"' : ''}>${item.contactResult}</option>
					</c:forEach>
				</select>
			</p>
			<p>
				<label>业务员：</label> <input name="salesman" type="text" class="required" size="30" value="${customerVisit.salesman}"
					<c:if test="${sessionInfo.role != '业务员'}"> suggestFields="salesman"
					suggestUrl="<c:url value='/showSalesmanSuggest' />" lookupGroup="" </c:if>
					<c:if test="${sessionInfo.role == '业务员'}">readonly="readonly"</c:if> />
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">确定</button>
						</div>
					</div></li>
				<li><div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div></li>
			</ul>
		</div>
	</form>
</div>
